/*/ ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 管理导航样式 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */
/*.管理导航样式外壳  */
.admin-nav {
    display: flex;
    justify-content: center;
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    margin: 0 0.5rem;
    text-decoration: none;
    color: #666;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.admin-nav-item i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.admin-nav-item:hover {
    background-color: #f5f5f5;
    color: #333;
}

.admin-nav-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
}

/*/ ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 管理内容区域样式 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */


/*. 管理内容区域样式外壳 */
.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/*. 头部样式外壳 */
.content-header {
    margin-bottom: 2rem;
}

/*. 搜索栏样式外壳 */
.search-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/*. 分类选择框样式 */
.search-section select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
    color: #6e6e6e;
}

/*. 分类选择框获得焦点样式 */
.search-section select:focus {
    border-color: #4a90e2;
    outline: none;
}

.permission-search {
    color: #6e6e6e;
}

.search-box {
    display: flex;
    gap: 10px;
    width: 300px;
    /* 固定搜索框宽度 */
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #4a90e2;
    outline: none;
}

.search-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/*. 按钮样式 */
.search-btn,
.reset-btn,
.add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 14px;
    white-space: nowrap;
    min-width: 90px;
    /* 设置按钮最小宽度 */
}

/*. 搜索按钮样式 */
.search-btn {
    background-color: #4a90e2;
    color: white;
}

.search-btn:hover {
    background-color: #3a7bc8;
}

/*. 重置按钮样式 */
.reset-btn {
    background-color: #f0f0f0;
    color: #666;
}

.reset-btn:hover {
    background-color: #e0e0e0;
}

.search-right {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-end;
}

/*. 搜索栏右侧数据数量样式 */
.search-right>p>span {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 14px;
}

/*. 添加按钮样式 */
.add-btn {
    background-color: #4caf50;
    color: white;
}

.add-btn:hover {
    background-color: #43a047;
}

/*/ ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 数据区 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓  */
/*. 空数据样式 */
.empty-data {
    width: 100%;
    text-align: center;
    font-size: 20px;
    color: #999;
}

/*. 数据列表外壳样式 */
.content-body {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/*. 数据列表内部外壳样式 */
.data-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/*. 单项数据卡片外壳 */
.data-item {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*. 单项数据卡片鼠标悬停样式 */
.data-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/*. 数据图标外壳样式 */
.data-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    background-color: #f5f5f5;
    padding: 1rem;
    cursor: pointer;
}

/*. 数据图片样式 */
.data-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/*. 数据信息外壳样式 */
.data-info {
    padding: 1rem;
    flex-grow: 1;
}

/*. 数据名称样式 */
.data-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

/*. 数据信息样式 */
.data-info p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/*. 数据元信息外壳样式 */
.data-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
}




/*. 操作按钮外壳样式 */
.data-actions {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

/*. 操作按钮通用样式 */
.action-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

/*. 图标样式 */
.action-btn i {
    margin-right: 0.5rem;
}

/*. 用户收藏按钮 */
.action-btn.collect {
    background-color: #e8f5e9;
    color: #388e3c;
}

/*. 编辑按钮:hover */
.action-btn.collect:hover {
    background-color: #c8e6c9;
}

/*. 编辑按钮 */
.action-btn.edit {
    background-color: #e3f2fd;
    color: #1976d2;
}

/*. 编辑按钮:hover */
.action-btn.edit:hover {
    background-color: #bbdefb;
}

/*. 删除按钮 */
.action-btn.delete {
    background-color: #ffebee;
    color: #d32f2f;
}

/*. 删除按钮:hover */
.action-btn.delete:hover {
    background-color: #ffcdd2;
}

/*/ ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 模态框样式 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */
/*. 模态框样式外壳  */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/*. 模态框内容外壳 */
.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}


/*. 模态框动画 */
@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/*. 模态框头部样式 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

/*. 模态框标题样式 */
.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 500;
}

/*. 关闭按钮样式 */
.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/*. 模态框内容样式 */
.modal-body {
    padding: 0 1rem;
}

/*. 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

/*. 表单标签样式 */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}


/*. 表单输入框样式 */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: white;
}

/*. 文本域样式 */
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.ico-input {
    display: flex;
    height: 3rem;
    align-items: center;
    gap: 10px;
}

.ico-input img {
    /* 确保图片的尺寸不会超过输入框的尺寸 */
    object-fit: cover;
    height: 3rem;
    width: 3rem;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
}

/*. 表单输入框获得焦点样式 */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.preview-ico {
    width: 100%;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    border-radius: 4px;
    object-fit: cover;
}

/*. 模态框底部样式 */
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/*. 按钮样式 */
.cancel-btn,
.save-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 80px;
}

/*. 取消按钮样式 */
.cancel-btn {
    background-color: #f0f0f0;
    color: #666;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

/*. 保存按钮样式 */
.save-btn {
    background-color: #4a90e2;
    color: white;
}

.save-btn:hover {
    background-color: #3a7bc8;
}



/*/ ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 响应式设计 ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */
@media (max-width: 768px) {

    /*. 顶部导航栏样式 */
    .admin-nav {
        /* flex-direction: column; */
        align-items: stretch;
    }

    /*. 顶部导航栏项目样式 */
    .admin-nav-item {
        margin: 0.25rem 0;
        justify-content: center;
    }

    /*. 搜索框外壳 */
    .data-list {
        grid-template-columns: 1fr;
    }

    /* . 搜索框外壳 */
    .search-box {
        width: 100%;
        flex-direction: column;
    }

    /*. 搜索和重置按钮外壳 */
    .search-section {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    /* . 搜索框、重置按钮、分类选择器宽度 */
    .category-selector,
    .search-btn,
    .reset-btn {
        width: 100%;
    }

    /*. 内容外壳 */
    .content-body {
        width: 100%;
        padding: 0;
        background-color: #00000000;
        box-shadow: none;
    }

    /*. 模态框内容外壳 */
    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .admin-nav-item {
        padding: 0.3rem 0.75rem;
        font-size: 0.75rem;
    }

    .admin-nav-item .mdi {
        font-size: 0.75rem;
    }
}